package com.zlf.sb.demo;

import cn.smallbun.screw.core.engine.EngineFileType;
import cn.smallbun.screw.core.engine.EngineTemplateType;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/***
 *@title ScrewProperties
 *@description <TODO description class purpose>
 *@author wgc_j
 *@version 1.0.0
 *@create 2025-02-14 14:25
 **/
@Data
public class ScrewProperties {
    /**数据库脚本版本*/
    private String version ;
    /**标题*/
    private String title ;
    /**数据库脚本说明*/
    private String desc ;
    /**机构*/
    private String org ;
    /**机构网址*/
    private String orgUrl ;
    /**是否启用*/
    private boolean enabled = false ;
    private boolean autoGen = false ;
    /**全局配置*/
    private ScrewConfig config = new ScrewConfig() ;
    /**忽略表设置*/
    private TableConfig tables = new TableConfig() ;
    @Data
    public static class TableConfig {
        /**指定生成的表*/
        private List<String> designatedTables = new ArrayList<>() ;
        /**指定生成表的前缀*/
        private List<String> designatedTablePrefixs = new ArrayList<>() ;
        /**指定生成表的后缀*/
        private List<String> designatedTableSuffixs = new ArrayList<>() ;
        /**忽略表*/
        private List<String> ignoreTables = new ArrayList<>() ;
        /**忽略表前缀*/
        private List<String> ignoreTablePrefixs = new ArrayList<>() ;
        /**忽略表后缀*/
        private List<String> ignoreTableSuffixs = new ArrayList<>() ;
    }
    @Data
    public static class ScrewConfig {
        /**文档输出目录*/
        private String fileOutputDir="D:\\code" ;
        /**生成完成是否打开目录*/
        private boolean openOutputDir = true ;
        /**文档类型*/
        private EngineFileType fileType = EngineFileType.HTML;
        /**文档生成模版类型*/
        private EngineTemplateType produceType = EngineTemplateType.freemarker ;
        /**文档名称*/
        private String fileName = "数据库设计文档" ;

    }
}
